package com.atguigu.day07.test;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/6 15:12
 * @注释
 */
public class MyDate {
    int year;
    int month;
    int day;
}

class Employee {
    String name;
    MyDate bir;
}

class Test {
    public static void main(String[] args) {
        Employee e1 = new Employee();
        Employee e2 = new Employee();
        MyDate d1 = new MyDate();
        d1.year = 2000;
        d1.month = 12;
        d1.day = 28;
        e1.name = "李华";
        e1.bir = d1;

        e2.bir = new MyDate();
        e2.name = "猢狲";
        e2.bir.year = 1997;
        e2.bir.month = 12;
        e2.bir.day = 28;


        System.out.println(e1.name + " " + "生日是：" + e1.bir.year + "年" + e1.bir.month + "月" + e1.bir.day + "日");
        System.out.println(e2.name + " " + "生日是：" + e2.bir.year + "年" + e2.bir.month + "月" + e2.bir.day + "日");

    }
}
